package org.chen.preprocess;

public class Field {
	Field(String name, String type, String comment, boolean autoincrement) {
		this.name = name;
		this.comment = comment;
		this.type = type;
		this.autoIncrement = autoincrement;
		this.mget = (type.equalsIgnoreCase("java.lang.Boolean") ? "is" : "get")
				+ name.substring(0, 1).toUpperCase() + name.substring(1);
		this.mset = "set" + name.substring(0, 1).toUpperCase()
				+ name.substring(1);
	}

	String mget;
	String mset;
	String name;
	String type;
	String comment;
	boolean autoIncrement = false;

	public boolean isAutoIncrement() {
		return autoIncrement;

	}

	public void setAutoIncrement(boolean autoIncrement) {
		this.autoIncrement = autoIncrement;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public String getMget() {
		return mget;
	}

	public void setMget(String mget) {
		this.mget = mget;
	}

	public String getMset() {
		return mset;
	}

	public void setMset(String mset) {
		this.mset = mset;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

}